package ai.people.netmon.msgsearch.domain.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * @author LiGuanNan
 * @date 2022/6/23 16:55
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "user-social-twitter")
public class TwitterSocialUser implements Serializable {

    /**
     * 公共字段
     */
    @Id
    private String id;

    @Field(name = "description", type = FieldType.Text)
    private String description;

    @Field(name = "follower_count", type = FieldType.Long)
    private Long followerCount;

    @Field(name = "following_count", type = FieldType.Long)
    private Long followingCount;

    @Field(name = "head_image", type = FieldType.Text)
    private String headImage;

    @Field(name = "nick_name", type = FieldType.Text)
    private String nickName;

    @Field(name = "phone", type = FieldType.Text)
    private String phone;

    @Field(name = "user_name", type = FieldType.Text)
    private String userName;

    @Field(name = "user_type", type = FieldType.Text)
    private String userType;

    /**
     * twitter 特有字段
     */
    @Field(name = "join_time", type = FieldType.Date)
    private String joinTime;

    @Field(name = "messages_count", type = FieldType.Long)
    private String messagesCount;

    @Field(name = "urls", type = FieldType.Text)
    private String urls;

}
